<template>
    <div v-loading="loading">
        <template>
            <el-descriptions :column="3" border class="margin-top" title="提现详情">
                <!-- <el-descriptions-item>
                    <template slot="label">代理ID</template>
                    <UserInfo :user_id="datas.agent_id" v-if="datas.agent_id" :showBtn="false"></UserInfo>
                </el-descriptions-item> -->
                <el-descriptions-item>
                    <template slot="label">ID</template>
                    {{ datas.id }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">银行卡编码</template>
                    {{ datas.bank_code }}
                </el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label">银行名称</template>
                    {{ datas.bank_name }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">真实姓名</template>
                    {{ datas.real_name }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">银行卡号</template>
                    {{ datas.bank_card }}
                </el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label">开户行地址</template>
                    {{ datas.bank_address }}
                </el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label">提现秀币</template>
                    {{ datas.balance }}
                </el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label">手续费</template>
                    {{ datas.fee  }}  人民币
                </el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label">提现到账金额</template>
                    {{ datas.money }} 人民币
                </el-descriptions-item>
                <el-descriptions-item>
                    <template slot="label">提现状态</template>
                    <el-tag type="warning" v-if="datas.status == 0">待审核</el-tag>
                    <el-tag type="success" v-else-if="datas.status == 1">已通过</el-tag>
                    <el-tag type="danger" v-else-if="datas.status == 2">已拒绝</el-tag>
                </el-descriptions-item>



                <el-descriptions-item>
                    <template slot="label">提现时间</template>
                    {{ datas.created_at }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label">拒绝理由</template>
                    {{ datas.refuse_reason }}
                </el-descriptions-item>



                <el-descriptions-item v-if="datas.status != 0">
                    <template slot="label">{{ datas.status == 1 ? '通过时间' :  '拒绝时间' }}</template>
                    {{ datas.response_time }}
                </el-descriptions-item>

                

            </el-descriptions>

        </template>

        <div></div>
    </div>
</template>
      
<script>
export default {
    data() {
        return {
            visible: false,
            loading: false,
            tabdata: [],
            datas: {},
        }
    },
    mounted() {
        //this.getworksList()
        if (this.$route.query.id) {
            console.log('this.$route.query.id', this.$route.query.id)
            this.getWithdrawInfo(this.$route.query.id)
        }
    },
    methods: {
        passFun(id, status) {
            let that = this
            this.$request.put('/user-withdraw/update/' + id, { status: status }).then((res) => {
                this.$message.success('操作成功')
                that.getWithdrawInfo(id)
            })
        },

        getWithdrawInfo(id) {
            let that = this
            this.$request.get('/withdraw/get/' + id).then((res) => {
                that.tabdata = []
                that.datas = res

                console.log('res', res)
                that.tabdata.push(res)
            })
        },
    },
}
</script>
      
<style lang="scss" >
.el-button--text {
    margin-right: 20px !important;
}

.el-popover {
    width: 250px;
}
</style>